<!--
 * @FilePath     : /jquery/demo/101-19.html
 * @Description  : :only-child
 * @Date         : 2025-03-27 13:49:07
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-03-27 13:49:16
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <h2>jq_page</h2>

    <ul>
      <li>John</li>
      <li>Karl</li>
      <li>Brandon</li>
    </ul>
    <ul>
      <li>Glen</li>
    </ul>

    <script src="/library/jquery.min.js"></script>
    <script src="/common/common.js"></script>
    <script>
      // 查找是唯一子元素的 li
      console.log(1, $('li:only-child'))
      // [<li>Glen</li>]
    </script>
  </body>
</html>
